<?php
//个人信息
namespace Factory\Controller;
use Think\Controller;
use Mcit\Rbacs;

class BaseController extends Controller {
    
    protected function _initialize(){
    	
        if( session('fac_login_name')==null ){
			redirect(U('/Login/index'));
		}

        //安全检测
        if(session('fac_type')==2){
            layout('layout');
        }elseif(session('fac_type')==3){
            layout('operlayout');
        }

		header('Content-Type:text/html; charset=utf-8');
        if(!Rbacs::checkAuth()){
            $this->display("Public:auth");
            exit;
        }
	}

    //空操作
    function   _empty(){

        header( " HTTP/1.0  404  Not Found" );

        layout(false);

        $this->display("Public:404");

        exit;
    }

}